﻿namespace Arms.Framework
{
    using System;

    public static class NumericExtensions
    {
        /// <summary>
        /// Converts this value to radians.
        /// </summary>
        /// <param name="value">value must be degrees</param>
        /// <returns>value as radian</returns>
        public static double ToRadians(this double value)
        {
            return (System.Math.PI / 180) * value;
        }
        /// <summary>
        /// Converts this value to degrees.
        /// </summary>
        /// <param name="value">value must be radians</param>
        /// <returns>value as degree</returns>
        public static double ToDegrees(this double value)
        {
            return value * (180 / System.Math.PI);
        }
    }
}
